package com.zsrt.java.day20161226.cg.demo03.method01;


import java.util.Scanner;

//import org.junit.Test;

/**
 * 1：能被4整除但是不能被100整除
 * 2：能被400整除
 * 
 *
 */
/*public class RunNianTest {
	
	@Test
	public void runNian(){
		Scanner y = new Scanner(System.in);
		System.out.println("请输入年份");
		
		int year = y.nextInt();
		y.close();
		boolean yq1 = (year%4 == 0) && (year%4 != 0);
		boolean yq2 = (year%400 == 0);
		if(yq1 || yq2){
			System.out.println("今年是闰年");
			
		}else{
			System.out.println("今年不是闰年");
		}
		
	}	

}*/
public class RunNianTest {
	
	public static void main(String[] args) {
		Scanner y = new Scanner(System.in);
		System.out.println("请输入年份");
		int year = y.nextInt();
		y.close();
		runNian(year);
	}
	public static void runNian(int year){
		
		boolean yq1 = (year%4 == 0) && (year%4 != 0);
		boolean yq2 = (year%400 == 0);
		if(yq1 || yq2){
			System.out.println("今年是闰年");
			
		}else{
			System.out.println("今年不是闰年");
		}
		
	}	
	
}
